<div class="register-box-body">
  <p class="login-box-msg">登录</p>

  <%= form_for @user, url: {action: 'login'} do |user| %>
      <div class="form-group has-feedback">
        <%= user.text_field :username, class: 'form-control', placeholder: '用户名'%>
      </div>
      <div class="form-group has-feedback">
        <%= user.password_field :password, class: 'form-control', placeholder: '密码'%>
      </div>
      <div class="row">
        <div class="col-xs-16"></div>
        <div class="col-xs-12">
          <button type="submit" style="float: right" class="btn btn-primary">登陆</button>
          <button type="submit" style="float: left"  class="btn btn-primary" onclick="window.open('/register')">注册</button>
        </div>
      </div>

  <% end %>
</div>

<!--引入错误提示框-->
<%= render partial: 'common/alert', object: @user %>